#pragma once
#include "../Common/Common.h"

enum ProtertyType
{
	PT_INVAILD,
	PT_UINT32,
	PT_FLOAT,
	PT_STRING
};

class Property
{
public:
	Property(void)
	{
		m_value.pointer = 0;
	}

	uint32 getUint32Value() const
	{
		return m_value.integer;
	}

	float getFloatValue() const
	{
		return m_value.number;

	}

	const char* getStringValue() const
	{
		return m_value.pointer;

	}

	void Property::getValue(uint32* v) const
	{
		*v = m_value.integer;
	}


	void Property::getValue(float* v) const
	{
		*v = m_value.number;
	}

	void Property::getValue(const char** v) const
	{
		*v = (const char*)m_value.pointer;
	}

	void setValue(uint32 v)
	{
		m_value.integer = v;
	}

	void setValue(float v)
	{
		m_value.number = v;
	}

	void setValue(const char* v)
	{
		m_value.pointer = v;
	}

private:
	union Value
	{
		const char* pointer;
		uint32 integer;
		float number;
	};

	
	Value m_value;

};

